using System;

namespace Azure.Infrastructure
{
    public interface IQueue<T> where T : IMessage
    {
        void Enqueue(T item);
        QueuedMessage<T> Dequeue(TimeSpan timeout);
    }

    public class QueuedMessage<T> where T : IMessage
    {
        public QueuedMessage(DateTime? expirationTime, string id, DateTime? insertionTime, T body)
        {
            this.ExpirationTime = expirationTime;
            this.Id = id;
            this.InsertionTime = insertionTime;
            this.Body = body;
        }

        public DateTime? ExpirationTime { get; private set; }
        public string Id { get; private set; }
        public DateTime? InsertionTime { get; private set; }
        public T Body { get; private set; }

    }

    public interface IMessage
    {
        
    }
}